# config为K8s的上下文文件

#FROM maven:3.6.3-jdk-11 AS builder
FROM registry.cn-zhangjiakou.aliyuncs.com/default_base/aliyun_setting_maven:v1.0 AS builder
COPY src /usr/src/app/src
COPY pom.xml /usr/src/app/pom.xml
COPY LocalK8sConfig /user/src/app/config
RUN mvn -f /usr/src/app/pom.xml -Dmaven.test.skip=true clean package

FROM openjdk:8
WORKDIR /
COPY config config
COPY --from=builder /usr/src/app/target/FlinkGateway.jar FlinkGateway.jar
ENV RUNPATH localDocker
EXPOSE 8080
CMD java -jar FlinkGateway.jar --spring.profiles.active=$RUNPATH